"use strict";
const common_vendor = require("../../common/vendor.js");
const stores_userInfo = require("../../stores/userInfo.js");
if (!Array) {
  const _easycom_up_avatar2 = common_vendor.resolveComponent("up-avatar");
  const _easycom_uni_tag2 = common_vendor.resolveComponent("uni-tag");
  const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
  (_easycom_up_avatar2 + _easycom_uni_tag2 + _easycom_up_icon2)();
}
const _easycom_up_avatar = () => "../../node-modules/uview-plus/components/u-avatar/u-avatar.js";
const _easycom_uni_tag = () => "../../uni_modules/uni-tag/components/uni-tag/uni-tag.js";
const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
if (!Math) {
  (_easycom_up_avatar + _easycom_uni_tag + _easycom_up_icon)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "userOfTopLeft",
  props: {
    userAvatar: {
      type: String,
      default: ""
    },
    userName: {
      type: String,
      default: ""
    },
    showStatusTag: {
      type: Boolean,
      default: false
    },
    statusTagName: {
      type: String,
      default: ""
    },
    showMoreIcon: {
      type: Boolean,
      default: true
    }
  },
  emits: ["onUserInfo"],
  setup(__props, { emit: __emit }) {
    const userInfoStore = stores_userInfo.useUserInfoStore();
    const emit = __emit;
    const onUserInfo = (e) => {
      emit("onUserInfo", e);
    };
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: !common_vendor.unref(userInfoStore).token || common_vendor.unref(userInfoStore).token && common_vendor.unref(userInfoStore).userInfo && common_vendor.unref(userInfoStore).userInfo.registerStatus == 0 && common_vendor.unref(userInfoStore).userInfo.userType === 1
      }, !common_vendor.unref(userInfoStore).token || common_vendor.unref(userInfoStore).token && common_vendor.unref(userInfoStore).userInfo && common_vendor.unref(userInfoStore).userInfo.registerStatus == 0 && common_vendor.unref(userInfoStore).userInfo.userType === 1 ? common_vendor.e({
        b: common_vendor.p({
          src: __props.userAvatar,
          shape: "circle",
          size: "21"
        }),
        c: common_vendor.t(__props.userName),
        d: __props.showStatusTag
      }, __props.showStatusTag ? {
        e: common_vendor.p({
          text: __props.statusTagName,
          type: "success",
          ["custom-style"]: "background-color: #fff; border: none; color: #0189FE;font-size:25rpx; border-radius: 8rpx; height:35rpx; line-height:35rpx; padding: 4rpx 8rpx;"
        })
      } : {}, {
        f: __props.showMoreIcon
      }, __props.showMoreIcon ? {
        g: common_vendor.p({
          name: "arrow-right",
          color: "#fff",
          size: "10"
        })
      } : {}, {
        h: common_vendor.o(onUserInfo)
      }) : common_vendor.e({
        i: common_vendor.p({
          src: __props.userAvatar,
          shape: "circle",
          size: "21"
        }),
        j: common_vendor.t(__props.userName),
        k: __props.showStatusTag
      }, __props.showStatusTag ? {
        l: common_vendor.p({
          text: __props.statusTagName,
          type: "success",
          ["custom-style"]: "background-color: #fff; border: none; color: #0189FE;font-size:25rpx; border-radius: 8rpx; height:35rpx; line-height:35rpx; padding: 4rpx 8rpx;"
        })
      } : {}, {
        m: __props.showMoreIcon
      }, __props.showMoreIcon ? {
        n: common_vendor.p({
          name: "arrow-right",
          color: "#fff",
          size: "10"
        })
      } : {}, {
        o: common_vendor.o(onUserInfo)
      }));
    };
  }
});
wx.createComponent(_sfc_main);
